home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
maximus
/
valmsg19.zip
/
VALMSG.DOC
< prev
next >
Wrap
Text File
|
1992-08-26
|
5KB
|
118 lines
VALMSG -- Creates validation messages from questionnaire data
Version 1.9 (8/26/92)
Written by Bob Quinlan of Austin, Texas, USA
Sysop of Red October at 512-834-2593 (1:382/111)
Copyright 1992 by Bob Quinlan
Compatible with Maximus 2.00 and 2.01
This program reads a single user's questionnaire data and generates a
message from that user to the sysop containing the data. You can change
the defaults for who the message comes from, who the messages is
addressed to, and what subject goes on the message.
/Mmessagearea Message area "number". This must be supplied.
/Vfile Validation file. This must be supplied.
/Aareafile Area file. Default is AREA.DAT in the current
directory.
/Fusername From username. If this is not supplied the first
line of the validation file will be assumed to be a
[post] entry and the user's name will be extracted
from it.
/Ssubject Subject line. (default: Questionnaire)
/Tusername To username. (default: Sysop)
You may want to supply multiple word values for /F, /S, and /T. You can
separate the words by spaces or by underscores (which will be replaced
by spaces). For example, both of these would produce the same results:
valmsg /mper /vquest.tmp /tBob Quinlan /sHello there!
valmsg /mper /vquest.tmp /tBob_Quinlan /sHello_there!
There are any number of ways that VALMSG can be used. I'll show you my
questionnaire and part of my Maximus batch file as examples of one way.
Here is my questionnaire (somewhat edited for length) between the lines:
-------------------------------------------------------------------------------
[lightblue]Do you wish to fill out the questionnaire [[Y,n]? [green menu]yn|
[choice]n[quit]
[open]D:\Max\Quest.Tmp
[post][lightblue]
Enter your first and last name: [green ansreq clear_stacked readln]
[lightblue]
Enter your home phone number (including area code): [green readln]
[lightblue]Address (line 1 of 3): [green readln]
[lightblue]Address (line 2 of 3): [green ansopt readln]
[lightblue]Address (line 3 of 3): [green readln]
[lightcyan][ansreq][open]Nul
Thank you for filling out the questionnaire!
When you log off the system will automatically generate a message from
you to the sysop containing your questionnaire answers.
[lightblue enter]
-------------------------------------------------------------------------------
You could run VALMSG from a MECCA, but I like to run it after the user
has logged off. Here is the piece of my Maximus batch file that does
the job:
if not exist quest.tmp goto noquest
valmsg /mper /vquest.tmp /tBob Quinlan
type quest.tmp >>quest.log
del quest.tmp
:noquest
If QUEST.TMP exists VALMSG is run to process it. Then the TYPE command
appends QUEST.TMP onto the end of the permanent QUEST.LOG file and
QUEST.TMP is deleted.
VALMSG returns ERRORLEVEL 0 after a successful run. ERRORLEVEL 1 is
returned to indicate an error.
NOTICE: You may use, copy, and distribute this program freely as long
as you insure that both the executable and the documentation (.DOC)
files are included in the distribution package. The source code does
not need to be included. You may modify this program and document, so
long as reasonable credit is given to the original author if a
substantial portion of the original remains intact. The author is not
responsible for any losses which may occur either directly or indirectly
as a result of using this program.
This program uses the Squish MsgAPI and the Maximus structures written
by Scott J. Dudley. "Squish" is a trademark of Scott J. Dudley.
HISTORY:
Version 1.9 (8/26/92) -- Fixed a problem with handling multiple-word
parameters.
Version 1.8 (8/25/92) -- Added the ability to pass multiple-word
parameters using spaces.
Version 1.7 (8/10/92) -- Provided additional documentation and
examples of how to use the program. No
code changes.
Version 1.6 (6/03/92) -- Added *.MSG support. /M is now the "number"
for the area, not its path. You may need to
use the /A switch if AREA.DAT is not in the
current directory.
Version 1.5 (5/26/92) -- Use _fsopen instead of local s_fopen.
Version 1.4 (5/13/92) -- Added file sharing.
Version 1.3 (4/23/92) -- Zero-out headers. Cleaned up docs.
Version 1.2 (4/18/92) -- Extract username properly from data.
Version 1.1 (4/17/92) -- Added switches.
Version 1.0 (4/15/92) -- Original release. Written in Borland C.